<template>
    <div class="table">
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item><i class="icon iconfont icon-jifen"></i>等待审核列表</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <el-tabs  v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="心情审核" name="3"></el-tab-pane>
                <el-tab-pane label="求购审核" name="4"></el-tab-pane>
                <el-tab-pane label="供应审核" name="5"></el-tab-pane>
                <el-tab-pane label="二手审核" name="6"></el-tab-pane>
                <el-tab-pane label="印厂审核" name="7"></el-tab-pane>
                <el-tab-pane label="设备审核" name="8"></el-tab-pane>
                <el-tab-pane label="招聘职位审核" name="9"></el-tab-pane>
            </el-tabs>
            <!-- <keep-alive> -->
                <mood :is="currentTabComponent"></mood>
            <!-- </keep-alive> -->
        </div>
       
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getFenzhanPublicList,postFenzhanActivityDelete} from "@/api/branch/activity";
import mood from './components/mood'
import buy from './components/buy'
import supply from './components/supply'
import used from './components/used'
import factory from './components/factory'
import device from './components/device'
import job from './components/job'
export default {
    name:"activityList",
    data () {
        return {
            //要审核的对象类型：3心情、4求购、5供应、6二手、7印厂、8设备、9招聘职位
            pageIndex:1,//当前页码
            pageSize:10,//每页10条
            totalPages:1,//默认的总条数
            title:'',// 标题
            tableData:[],//表格数据
            delVisible:false, //是否显示查看详情弹出层
            delIndex:0,
            delId:0,
            activeName: '3',
            type:3,//默认心情
            currentTabComponent:"mood",//默认的第一个组件
        }
    },
    //子组件
    components:{
        mood,
        buy,
        supply,
        used,
        factory,
        device,
        job,
    },
    computed:{
        ...mapGetters(['userInfo']),
    },
    mounted() {
        // console.log(this.userInfo)
        this.$nextTick(function () {
            //获取待处理的数据
            
        })
    },
    filters:{
        
    },
    methods: {
        handleClick(tab, event) {
            //要查询的对象类型：1活动、2动态、3心情、4求购、5供应、6二手
            let type = parseInt(tab.name);
            if(type==3){
                this.currentTabComponent="mood";
            }else if(type==4){
                this.currentTabComponent="buy";
            }else if(type==5){
                this.currentTabComponent="supply";
            }else if(type==6){
                this.currentTabComponent="used";
            }else if(type==7){
                this.currentTabComponent="factory";
            }
            else if(type==8){
                this.currentTabComponent="device";
            }
            else if(type==9){
                this.currentTabComponent="job";
            }
            this.type =type;
        }
    }
}
</script>
<style lang="stylus" scoped>
    .handle-box {
        margin-bottom: 20px;
    }

    .handle-select {
        width: 120px;
    }

    .handle-input {
        width: 300px;
        display: inline-block;
        margin-right :30px;
    }
    .del-dialog-cnt{
        font-size: 16px;
        text-align: center
    }
    .edit {
    color: #ff9800;
}

.del {
    color: #e51c23;
}

.download {
    color: #67C23A;
}
</style>


